home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / bp7bugs2.zip / NEWSHR.FIX < prev    next >
Text File  |  1992-11-29  |  595b  |  30 lines

  1. From terra@ask.diku.dk Sun Nov 29 15:27:26 1992
  2. To: dmurdoch@mast.QueensU.CA (Duncan Murdoch)
  3. Subject: Re: TP7 bug -- SHR/SHL for longints
  4.  
  5.  
  6. Two substitute routines follow:
  7.  
  8. @@shr:    shl    edx,10h        ; (dx:ax) shr (cl and 31)
  9.     mov    dx,ax        ; edx now holds operand
  10.     shr    edx,cl
  11.     mov    ax,dx
  12.     shr    edx,10h
  13.     ret
  14.  
  15.  
  16. @@shl:    shl    edx,10h        ; (dx:ax) shl (cl and 31)
  17.     mov    dx,ax        ; edx now holds operand
  18.     shl    edx,cl
  19.     mov    ax,dx
  20.     shr    edx,10h
  21.     ret
  22. ; -----------------------------------------------------
  23. (Shifts have never been significant to more 32 bits.)
  24.  
  25.  
  26. Morten Welinder
  27. terra@diku.dk
  28.  
  29.  
  30.